# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# contributor: Jacek Poplawski <jacekpoplawski@gmail.com>

pkgname=rocksndiamonds-data
pkgver=4.3.4.0
pkgrel=1
arch=(any)
pkgdesc='rockndiamonds game data and levels'
url="https://www.artsoft.org/rocksndiamonds/"
license=('GPL')
depends=()
makedepends=('unzip' 'p7zip')
options=('!strip')
source=(https://www.artsoft.org/RELEASES/linux/rocksndiamonds/rocksndiamonds-$pkgver-linux.tar.gz)
sha256sums=('81d815e1296c041ed94ae9777397f40fdf5d13ecb5b375202af96a3119904ad7')

package() {
  cd "$srcdir"/rocksndiamonds-$pkgver

  install -d "$pkgdir"/usr/share/rocksndiamonds
  cp -R graphics "$pkgdir"/usr/share/rocksndiamonds
  cp -R levels "$pkgdir"/usr/share/rocksndiamonds
  cp -R sounds "$pkgdir"/usr/share/rocksndiamonds
  cp -R music "$pkgdir"/usr/share/rocksndiamonds

  chown -R root:root "$pkgdir"/usr/share/rocksndiamonds
  find "$pkgdir"/usr/share/rocksndiamonds -type d -exec chmod 0755 {} \;
  find "$pkgdir"/usr/share/rocksndiamonds -type f -exec chmod 0644 {} \;
}
